package com.lantosec.hmrp.modules.morality.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.morality.vo.MoralityNoteBaditemVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 一票认定差的追加记录 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MoralityNoteBaditem extends BaseEntity<MoralityNoteBaditemVO> {

    private static final long serialVersionUID = 1L;
    public MoralityNoteBaditem(MoralityNoteBaditemVO vo){
        this.noteBaditemId = vo.getNoteBaditemId();
        this.moralityNoteId = vo.getMoralityNoteId();
        this.moralityItemId = vo.getMoralityItemId();
        this.moralityStep = vo.getMoralityStep();
        this.createUserId = vo.getCreateUserId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
    }

    @Override
    public MoralityNoteBaditemVO convertToVO(){
        return new MoralityNoteBaditemVO(this);
    }


    /**
     * 追加记录ID
     */
    @TableId(value = "note_baditem_id", type = IdType.AUTO)
    private Integer noteBaditemId;

    /**
     * 考评记录ID
     */
    private Integer moralityNoteId;

    /**
     * 一票认定差的项目ID
     */
    private String moralityItemId;

    /**
     * 追加时的考评环节
     */
    private Integer moralityStep;

    /**
     * 添加人ID
     */
    private String createUserId;

    /**
     * 添加人
     */
    private String createUser;

    /**
     * 添加时间
     */
    private Date createTime;


    public enum ColName {
        note_baditem_id, morality_note_id, morality_item_id, morality_step, create_user_id, create_user, create_time, 
    }
}
